<?php namespace footearth\phpstu\ValueObject;

class BadDollar
{
    protected $amount;

    public function __construct($amount = 0)
    {
        $this->amount = (float)$amount;
    }

    public function getAmount()
    {
        return $this->amount;
    }

    public function add($dollar)
    {
        $this->amount += $dollar->getAmount();
    }
}